//
//  WearWatchViewController.m
//  SmartWatch
//
//  Created by zwj on 2022/11/25.
//

#import "WearWatchViewController.h"
#import "BodyTestViewController.h"
@interface WearWatchViewController ()

@end

@implementation WearWatchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.isHideNavigationBar = YES;
    
}


- (void)initSubviews {
    [super initSubviews];
    
    UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, 210)];
    [backView az_setGradientBackgroundWithColors:@[HexColor(@"#C4EFEC"),HexColor(@"#C1F0ED"),COLOR_4] locations:@[@0.0,@0.7,@1.0] startPoint:CGPointMake(0.5, 0) endPoint:CGPointMake(0.5, 1)];
    [self.view addSubview:backView];
    
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [backBtn setImage:UIImageMake(@"icon_arrow_left") forState:UIControlStateNormal];
    backBtn.frame = CGRectMake(15, StatusBarHeightConstant, 40, 40);
    backBtn.imageEdgeInsets = UIEdgeInsetsMake(10,10,10,10);
    [backBtn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:backBtn];
    
    MyLinearLayout *root = [MyLinearLayout linearLayoutWithOrientation:MyOrientation_Vert];
    root.myHorzMargin = 30;
    root.myTop = 144;
    root.gravity = MyGravity_Horz_Center;
    [self.view addSubview:root];
    
    
    UILabel *name = [UILabel new];
    name.mySize = kAutoSize;
    name.attributedText = AttributedString(@"即将进行  ", UIFontBoldMake(20), COLOR333, @"ECG/PPG扫描检测", UIFontBoldMake(20), THEME_COLOR, NSTextAlignmentLeft, 10);
    [root addSubview:name];
    
    UILabel *content = [UILabel createLabelText:@"请佩戴好手表，并端正坐姿，将手水平放置" font:UIFontMake(15) textColor:COLOR666];
    content.mySize = kAutoSize;
    content.myTop = 10;
    [root addSubview:content];
    
    UIImageView *imageView = [[UIImageView alloc]initWithImage:UIImageMake(@"monitor_watch")];
    imageView.mySize = CGSizeMake(180, 180);
    imageView.myTop = 55;
    [root addSubview:imageView];
    
    UIButton *submitBtn = [UIButton createButtonText:@"佩戴好了" font:UIFontMake(14) textColor:COLOR_4];
    submitBtn.myHorzMargin = 0;
    submitBtn.myHeight = 46;
    submitBtn.myTop = 60;
    ViewCorner(submitBtn, 23);
    [submitBtn az_setGradientBackgroundWithColors:@[HexColor(@"#4BD8B1"),HexColor(@"#2CAED8")] locations:@[@0.0,@1.0] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1, 0.5)];
    [submitBtn addTarget:self action:@selector(submitBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [root addSubview:submitBtn];
}

- (void)submitBtnClick {
    BodyTestViewController *vc = BodyTestViewController.new;
    [self showViewController:vc sender:self];
}

@end
